package models;

import java.util.Date;
import java.util.List;

import siena.Column;
import siena.Generator;
import siena.Id;
import siena.Model;
import siena.Query;
import siena.Table;
import util.Utilities;

@Table("del_blog_entry")
public class DeletedBlogEntry extends Model {

	@Id(Generator.AUTO_INCREMENT)
	public Long id;
	
	@Column("title")
	public String title;
	
	@Column("content")
	public String content;
	
	@Column("create_time")
	public Date createTime;
	@Column("last_modify_time")
	public Date lastModifyTime;
	
	@Column("author_id")
	public Long authorId;
	
	public DeletedBlogEntry(BlogEntry entry) {
		super();
		title = entry.title;
		content = entry.content;
		createTime = entry.createTime;
		lastModifyTime = entry.lastModifyTime;
		authorId = entry.authorId;		
	}
		
	public static Query<DeletedBlogEntry> all() {
		return Model.all(DeletedBlogEntry.class);
	}
	
}
